<template>
  <div>
    <form @submit.prevent>
      <div class="vux-demo">
        <img class="logo" src="../../assets/vux_logo.png">
      </div>
      <div class="login">
        <verify-code :model="model" :smsType="smsType"></verify-code>
      </div>
      <div class="submit">
        <x-button>确认</x-button>
      </div>
    </form>
  </div>
</template>
<style>

</style>
<script>
  import {XButton} from 'vux';
  import * as types from '../../store/types'
  import VerifyCode from './VerifyCode'
  import * as constants from '../../AppConstants'
  export default{
    components: {
      VerifyCode,
      XButton
    },
    data () {
      return {
        model: {
          username: '',
          verifyCode: ''
        },
        smsType: constants.SMS_VERIFY_CODE_FORGET_PASSWORD
      }
    },
    created() {
      let header = Object.assign({}, this.$store.getters.backHeader, {
        title: '忘记密码'
      })
      this.$store.commit(types.UPDATE_HEADER, header)
    }
  }
</script>
